package nio.application;

import java.io.OutputStream;
import java.net.Socket;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2020-02-05 23:49
 */

public class TcpClient {
    public static void main(String[] args) throws Exception{
        System.out.println("socket tcp 客户端启动");
        Socket socket = new Socket("127.0.0.1", 7777);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("来自客户端的数据1".getBytes());
        socket.close();
    }
}
